<div class="panel-body">
    <form id="send-form" class="form-horizontal" role="send" data-toggle="validator" method="POST" action="">
        <div class="tab-pane" id="min" >
            <div class="row">
                <div class="form-group" style="display:flex; align-items:center; ">
                    <div class="col-xs-4">
                        <textarea class="form-control" id="code" data-toggle="tooltip" style="height:400px; width: 200px;" name="row[code]" placeholder="请输入序列号"></textarea>
                    </div>
                    <div class="col-xs-5">
                        <label>请选择产品分类</label>
                        <div class="form-inline" data-toggle="cxselect" data-selects="first,second,third">
                            <select class="first form-control" name="row[product]" required="required" data-url="ajax/cate?type=2&pid=0&id=8"></select>
                            <select class="second form-control" name="row[kemu]" required="required" data-url="ajax/cate" data-query-name="pid"></select>
                            <select class="third form-control" name="row[banben]" required="required" data-url="ajax/cate" data-query-name="pid"></select>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-success btn-embossed disabled">修改</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                <span id="count"></span>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/public/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript">
    document.onkeydown=function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){
            // enter 键
            var lines = $('#code').val().split(/\n/);
            var counts = lines.length;
            document.getElementById("count").innerText = counts+"个";
            console.log(count);
        }
    };
</script>
